﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="/static/css/table.css"
          type="text/css"></link>
    <script type="text/javascript" src="/static/javascript/jquery-1.7.2.js"></script>
	<!--以下3个js库必须按照顺序引入-->
	<!--vue脚本库-->
	<script type="text/javascript"
			src="/static/js/vue-3.2.4.global.js">
		<!--axios脚本库-->
	</script>
	<script type="text/javascript"
			src="/static/js/axios-0.18.0.min.js">
	</script>
	<!--我们自己封装的axios函数库 -->
	<script type="text/javascript"
			src="/static/js/axios-helper.js">
	</script>
</head>
<body id="app">
	<form>
		<table width="100%">
			<tr>
				<td>
					<font color="black">您正在做的业务是:人力资源--调动管理--调动审核</font>
				</td>
			</tr>
			<tr>
				<td align="right">
					<input type="radio" v-model="majorChange.checkStatus" value="1">通过
					<input type="radio" v-model="majorChange.checkStatus" value="0">不通过
					<input type="button" value="确认" class="BUTTON_STYLE1" @click="check()">
					<input type="button" class="BUTTON_STYLE1" onclick="javascript:window.history.back();" value="返回">
				</td>
			</tr>
		</table>
		<table width="100%" border="1" cellpadding=0 cellspacing=1
			   bordercolorlight=#848284 bordercolordark=#eeeeee
			   class="TABLE_STYLE1">
			<tr height="21">
				<td class="TD_STYLE1" width="8%">
					档案编号
				</td>
				<td class="TD_STYLE2" width="10%">
					<input type="text"  readonly="readonly"
						   v-model="majorChange.humanId" class="INPUT_STYLE2">
				</td>
				<td class="TD_STYLE1" width="8%">
					姓名
				</td>
				<td class="TD_STYLE2" width="10%">
					<input type="text" v-model="majorChange.humanName" readonly="readonly" class="INPUT_STYLE2">
				</td>
				<td class="TD_STYLE1" width="8%">
				</td>
				<td class="TD_STYLE2" width="10%">
				</td>
				<td class="TD_STYLE1" width="8%">
				</td>
				<td class="TD_STYLE2" width="10%">
				</td>
			</tr>
			<tr>

				<td class="TD_STYLE1" width="8%">
					原一级机构
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.firstKindName" readonly="readonly" value=""
						   class="INPUT_STYLE2">
					<input type="hidden" v-model="majorChange.firstKindId" value="">
				</td>
				<td class="TD_STYLE1" width="8%">
					原二级机构
				</td>
				<td class="TD_STYLE2" width="10%">
					<input type="text" v-model="majorChange.secondKindName" readonly="readonly" value=""
						   class="INPUT_STYLE2">
					<input type="hidden" v-model="majorChange.secondKindId" value="">
				</td>
				<td class="TD_STYLE1" width="8%">
					原三级机构
				</td>
				<td class="TD_STYLE2" width="10%">
					<input type="text" v-model="majorChange.thirdKindName" readonly="readonly" value=""
						   class="INPUT_STYLE2">
					<input type="hidden" v-model="majorChange.thirdKindId" value="">
				</td>
				<td class="TD_STYLE1" width="8%">
				</td>
				<td class="TD_STYLE2" width="10%">
				</td>
			</tr>

			<tr>
				<td class="TD_STYLE1">
					原职位分类
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.majorKindName" readonly="readonly"
						   value="" class="INPUT_STYLE2">
					<input type="hidden" v-model="majorChange.majorKindId" value="">
				</td>
				<td class="TD_STYLE1" width="12%">
					原职位名称
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.majorName" readonly="readonly"
						   class="INPUT_STYLE2">
					<input type="hidden" v-model="majorChange.majorId" value="">
				</td>
				<td class="TD_STYLE1">
					原薪酬标准
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.salaryStandardName" readonly="readonly" class="INPUT_STYLE2">
					<input type="hidden" v-model="majorChange.salaryStandardId" value="">
				</td>
				<td class="TD_STYLE1">
					原薪酬总额
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.salarySum"
						   value="" readonly="readonly"
						   class="INPUT_STYLE2">
				</td>

			</tr>
			<tr>
				<td class="TD_STYLE1">
					新一级机构名称
				</td>
				<td class="TD_STYLE2">
					<select style="width:160px" size="1" @change="change()" v-model="configFileSecondKind"
							class="SELECT_STYLE2">
						<option v-for="first in configFileFirstKindList" :value="first">
							{{first.firstKindName}}
						</option>
					</select>
					<input type="hidden" name="majorChange.newFirstKindName" value="Ⅰ级结构" id="newFirstKindName">
				</td>
				<td class="TD_STYLE1" width="12%">
					新二级机构名称
				</td>
				<td class="TD_STYLE2">
					<select style="width:160px" size="1" @change="changeSecond()" v-model="configFileThirdKind"
							class="SELECT_STYLE2">
						<option v-for="second in configFileSecondKindList" :value="second">
							{{second.secondKindName}}
						</option>
					</select>
					<input type="hidden" name="majorChange.newSecondKindName" value="" id="newSecondKindName">
				</td>
				<td class="TD_STYLE1" width="12%">
					新三级机构名称
				</td>
				<td class="TD_STYLE2">
					<select style="width:160px"  size="1" v-model="fourth"
							class="SELECT_STYLE2">
						<option v-for="third in ConfigFileThirdKindList" :value="third">
							{{third.thirdKindName}}
						</option>
					</select>
					<input type="hidden" name="majorChange.newThirdKindName" value="" id="newThirdKindName">
				</td>
				<td class="TD_STYLE1" width="8%">
				</td>
				<td class="TD_STYLE2" width="10%">
				</td>
			</tr>
			<tr>
				<td class="TD_STYLE1">
					新职位分类
				</td>
				<td class="TD_STYLE2">
					<select style="width:160px" size="1" v-model="configMajorKind" class="SELECT_STYLE2" >
						<option v-for="item in configMajorKindList" :value="item">
							{{item.majorKindName}}
						</option>
					</select>
					<input type="hidden" name="majorChange.newMajorKindName" value="软件开发" id="newMajorKindName">
				</td>
				<td class="TD_STYLE1" width="12%">
					新职位名称
				</td>
				<td class="TD_STYLE2">
					<select  class="INPUT_STYLE2" v-model="configMajor">
						<option v-for="con in configMajorList" :value="con">
							{{con.majorName}}
						</option>
					</select>
					<input type="hidden" name="majorChange.newMajorName" value="项目经理" id="newMajorName">
				</td>
				<td class="TD_STYLE1">
					新薪酬标准
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.newSalaryStandardName">
				</td>
				<td class="TD_STYLE1">
					新薪酬总额
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.newSalarySum" id="newSalarySum" readonly="readonly"
						    class="INPUT_STYLE2">
				</td>
			</tr>

			<tr>

				<td class="TD_STYLE1">
					登记人
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.register" readonly="readonly"
						   class="INPUT_STYLE2">
				</td>
				<td class="TD_STYLE1">
					登记时间
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.registTime" readonly="readonly" value="2012-11-24 00:00:00.0"
						   class="INPUT_STYLE2">
				</td>
				<td class="TD_STYLE1">
					复核人
				</td>
				<td class="TD_STYLE2">
					<input type="text" v-model="majorChange.checker" readonly="readonly" value="better_admin"
						   class="INPUT_STYLE2">
				</td>
				<td class="TD_STYLE1">
					复核时间
				</td>
				<td class="TD_STYLE2">
					<input type="date" v-model="majorChange.checkTime"  class="INPUT_STYLE2">
				</td>
			</tr>
			<tr>
				<td class="TD_STYLE1">
					调动原因
				</td>
				<td colspan="7" class="TD_STYLE2">
					<textarea v-model="majorChange.changeReason" rows="6" readonly="readonly" class="TEXTAREA_STYLE1" >

					</textarea>
				</td>
			</tr>
			<tr>
				<td class="TD_STYLE1">
					复合通过意见
				</td>
				<td colspan="7" class="TD_STYLE2">
					<textarea v-model="majorChange.checkReason" rows="6" class="TEXTAREA_STYLE1"></textarea>
				</td>
			</tr>
		</table>
	</form>
</body>
	<script type="module">
		Vue.createApp({
			data(){
				return{
					//复审人
					checker:sessionStorage.getItem("u"),
					majorChange:{
						//自增
						mchid:null,
						//一级机构编号
						firstKindId:null,
						//一级机构名称
						firstKindName:null,
						//二级机构编号
						secondKindId:null,
						//二级机构名称
						secondKindName:null,
						//三级机构编号
						thirdKindId:null,
						//三级机构名称
						thirdKindName:null,
						//职位分类编号
						majorKindId:null,
						//职位分类名称
						majorKindName:null,
						//职位编号
						majorId:null,
						//职位名称
						majorName:null,
						//新一级机构编号
						newFirstKindId:null,
						//新一级机构名称
						newFirstKindName:null,
						//新二级机构编号
						newSecondKindId:null,
						//新二级机构名称
						newSecondKindName:null,
						//新三级机构编号
						newThirdKindId:null,
						//新三级机构名称
						newThirdKindName:null,
						//新三级机构名称
						newMajorKindId:null,
						//新职位分类名称
						newMajorKindName:null,
						//新职位编号
						newMajorId:null,
						//新职位名称
						newMajorName:null,
						//人力资源档案编号
						humanId:null,
						//姓名
						humanName:null,
						//薪酬标准编号
						salaryStandardId:null,
						//薪酬标准名称
						salaryStandardName:null,
						//薪酬总额
						salarySum:null,
						//薪酬总额
						newSalaryStandardId:null,
						//新薪酬标准名称
						newSalaryStandardName:null,
						//新薪酬总额
						newSalarySum:null,
						//调动原因
						changeReason:null,
						//调动原因
						checkReason:null,
						//复核通过状态
						checkStatus:null,
						//登记人
						register:null,
						//复核人
						checker:null,
						//复核人
						registTime:null,
						//复核时间
						checkTime:null
					},
					//一级机构列表
					configFileFirstKindList:[],
					//二级机构列表
					configFileSecondKindList:[],
					//三级机构列表
					ConfigFileThirdKindList:[],
					//一级机构列表保存对象
					configFileSecondKind:null,
					//二级机构列表保存对象
					configFileThirdKind:null,
					//三级机构列表保存对象
					fourth:null,
					//职位分类列表
					configMajorKindList:[],
					//职位分类列表保存对象
					configMajorKind:null,
					//职位列表
					configMajorList:[],
					//职位列表保存对象
					configMajor:null
				}
			},
			methods:{
				//加载一级结构列表
				loadConfigFileFirstKindList(){
					requestGet("/configFileFirstKind/queryList").then((data)=>{
						console.info(data);
						this.configFileFirstKindList=data;
					})
				},
				change(){
					console.info("configFileSecondKind对象：",this.configFileSecondKind);
					//加载二级机构设置列表
					requestGet("/configFileSecondKind/queryList",{
						firstKindId:this.configFileSecondKind.firstKindId
					}).then((data)=>{
						console.info(data);
						this.configFileSecondKindList=data;
					})

				}
				,
				//查询三级机构设置
				changeSecond(){
					requestGet("/configFileThirdKind/queryList",{
						secondKindId:this.configFileThirdKind.secondKindId
					}).then((data)=>{
						console.info(data);
						this.ConfigFileThirdKindList=data;
					})
				},
				//查询职位分类
				loadConfigMajorKindList(){
					requestGet("/configMajorKind/queryList").then((data)=>{
						console.info(data);
						this.configMajorKindList=data;
					})
				},
				//查询职位
				loadConfigMajorList(){
					requestGet("/configMajor/queryList").then((data)=>{
						console.info("***data",data);
						this.configMajorList=data;
					})
				},
				//复核提交
				check(){
					this.majorChange.newFirstKindId=this.configFileSecondKind.firstKindId;
					this.majorChange.newFirstKindName=this.configFileSecondKind.firstKindName;
					this.majorChange.newSecondKindId=this.configFileThirdKind.secondKindId;
					this.majorChange.newSecondKindName=this.configFileThirdKind.secondKindName;
					this.majorChange.newThirdKindId=this.fourth.thirdKindId;
					this.majorChange.newThirdKindName=this.fourth.thirdKindName;
					this.majorChange.newMajorKindId=this.configMajorKind.majorKindId;
					this.majorChange.newMajorKindName=this.configMajorKind.majorKindName;
					this.majorChange.newMajorId=this.configMajor.majorId;
					this.majorChange.newMajorName=this.configMajor.majorName;
					console.info(this.majorChange);
					requestPostman("/majorChange/save",this.majorChange).then((data)=>{
						console.info(data);
						if(data.statusCode==1){
							window.location.href="/templates/page/transfer/check_success.html";
						}
					})
				}
			},
			created(){
				requestGet("/majorChange/queryById",{
					mchid:sessionStorage.getItem("mchid")
				}).then((data)=>{
					console.info(data);
					this.majorChange=data;
				}),
				this.loadConfigFileFirstKindList();
				this.loadConfigMajorKindList();
				this.loadConfigMajorList();
			}
		}).mount("#app");
	</script>
</html>


